import { Button, ButtonProps } from "antd";
import classNames from "classnames";
import { ReactNode } from "react";

export function ButtonDevOnly(props: ButtonProps & { label?: ReactNode }) {
  const className = classNames(props.className, "dev_only")
  return (
    <Button
      size='small'
      {...props}
      className={className}
      onClick={(e) => {
        e.stopPropagation();
        e.preventDefault();
        props.onClick?.(e);
      }}>
      {props.label}
      {props.children}
    </Button>
  )
}